#ifndef RECEIPT_H
#define RECEIPT_H

#include "common/baseeditor.h"
#include "receipt_additem.h"

namespace Ui {
class Receipt;
}

class Receipt : public BaseEditor
{
    Q_OBJECT

public:
    explicit Receipt(QWidget *parent = nullptr);
    ~Receipt();

    void generateMenu();
    void updateMonth();
    void updateView();
    void setHeaderData();
    void newItem();

protected:
    void keyPressEvent(QKeyEvent *event);

private slots:
    void on_vouchNo_returnPressed();
    void on_listView_doubleClicked(const QModelIndex &index);

private:
    Ui::Receipt *ui;

    QString selectMonth;
    QStringListModel *listModel;
};

#endif // RECEIPT_H
